using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ObjectMapper.Benchmark.DataModel
{
    internal class JobCandidateConfiguration : EntityTypeConfiguration<JobCandidate>
    {
        public JobCandidateConfiguration()
        {
            ToTable("HumanResources.JobCandidate");
            HasKey(x => x.JobCandidateId);

            Property(x => x.JobCandidateId)
                .HasColumnName("JobCandidateID")
                .IsRequired()
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            Property(x => x.BusinessEntityId).HasColumnName("BusinessEntityID").IsOptional();
            Property(x => x.Resume).HasColumnName("Resume").IsOptional();
            Property(x => x.ModifiedDate).HasColumnName("ModifiedDate").IsRequired();
        }
    }
}